import { createBrowserRouter } from "react-router-dom";

import Layout from "../view/Layout/Layout";
import Home from "../view/Home/Home";
import Comment from "../view/Comment/Comment";
import List from "../view/List/List";

export const menuroute = [
    {
    path: "/home",
    name:"首页",
    element: <Home></Home>,
  },
    {
    path: "/list",
    name:"列表",
    element: <List></List>,
  },
]

const routers = [
  {
    path: "/",
    element: <Layout></Layout>,
    children:menuroute
  },
  {
    path: "/comment",
    element: <Comment></Comment>,
  },
]

const router = createBrowserRouter(routers);

export default router;
